From: Marco Trevisan (TreviƱo) Date: Thu, 16 Apr 2026 16:38:22 +0000 (+0200) Subject: mpris: Do not send player-removed for a player that has never been added X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~10^2^2~39 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e5ecef6f879fe3e5cd039f209cb26a4bd263d443;p=gnome-shell.git mpris: Do not send player-removed for a player that has never been added We only emit player-added for players that can play, but we remove them all, despite this state. This causes a non-fatal warning during the removal of a non-existent notification (that is in fact an undefined message) Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/8284 Part-of: --- diff --git a/js/ui/mpris.js b/js/ui/mpris.js index 44efbd64e..55231551f 100644 --- a/js/ui/mpris.js +++ b/js/ui/mpris.js @@ -244,7 +244,11 @@ export const MprisSource = GObject.registerClass({ if (player) { this._players.delete(name); player.disconnectObject(this); - this.emit('player-removed', player); + + // if !canPlay, the player has already been removed + // or was never exposed in our public players list + if (player.canPlay) + this.emit('player-removed', player); } }